<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外边距</title>
</head>
<style>
    #p1{
        width: 200px;
        height: 200px;
        border: 10px solid yellow;
    }
    #p2{
        width: 200px;
        height: 200px;
        border: 20px solid black;
        margin-top: 50px;/*外边框到外边框之间的距离是外边距 margin用于同级别盒子之间移动*/
    }
</style>
<body>
<div id="p1">

</div>
<div id="p2">

</div>
</body>
</html>